
#ifndef CommandsH
#define CommandsH    
#include <sstream>
#include "utils.h"
#include "servercontrol.h"
#include "player_info.h"

#define CMDSUCC 1
#define CMDFAIL -1
#define CMDNOMATCH 0

void InitCustomCommands();

// String to PlayerIndex
//		converts from any possibility of string: sv_players index, name, name-match, hash,
//		and returns the player index for that player, or -1 if there's no match.
//*For now: only takes sv_players index.
vector<playerindex> StrToIndList(string str);

// returns whether the command succeeded, failed, or didn't match. (1=succ, -1=fail, no match = 0), so match=true, nomatch = false
__declspec(dllexport) toggle CustmCmd(const char* CmdStr);

// returns whether or not the chat should be blocked.
bool ChatIntercept(wchar_t* thechat, Static_Player* pl);

// Takes a format string, and replaces %I with player index, and %R with rev-index.
string FormatCmd(string command, playerindex index=-1, playerindex target=-1);

#endif
